<template>
  <component ref="detail"
             :is="> myComponent"
             :showdevice="showdevice"
             @callBack="callBack"></component>
</template>
<script>
export default {

  data () {
    return {
      myComponent: null,
      showdevice: { name: '传递的名字' },
    }
  },
  mounted () {
    this.detailComponent();
    // if (this.myComponent) {
    //   this.myComponent.getPageRes(device); #调用子组件方法
    // }
  },
  methods: {
    detailComponent () {
      var myComponent = () => import('./system.vue');
      return this.myComponent = myComponent;
    },
    callBack () {
      console.log('子组件触发')
    }
  }
}
</script>